/**
 *  文件名:ActivityPrivacy.java
 *  修改人:lihangjie
 *  创建时间:2015-8-30 下午9:53:50
 */
package com.sharemob.tinchat.modules.account;

import java.util.ArrayList;

import android.os.Bundle;

import com.sharemob.tinchat.R;
import com.sharemob.tinchat.base.BaseActivity;
import com.sharemob.tinchat.base.Item;
import com.sharemob.tinchat.base.NoScrollListview;
import com.sharemob.tinchat.base.SlideSwitch.SlideListener;

/**
 * 
 * <一句话功能简述>
 * 
 * @author lihangjie version [版本号,2015-8-30 下午9:53:50]
 * @see [相关类/方法]
 * @since [产品/模块版本]
 * 
 */
public class ActivityPrivacy extends BaseActivity {
	private NoScrollListview listview_notice;
	private NoScrollListview listview_disturb;
	private NoScrollListview listview_strangeness;
	
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_privacy_setting);

		noticeEvent();
		disturbEvent();
		strangenessEvent();
		exitView(R.id.title_back,R.anim.activity_close,0);
		this.setTitle("隐私设置");
	}

	private void strangenessEvent(){
		ArrayList<Item> strangeness_list = new  ArrayList< Item>();
		 Item strangeness=new Item();
		 strangeness.setId("strangeness");
		 strangeness.setIcon(false);
		 strangeness.setMidIcon(null);
		 strangeness.setArrow_icon(false);
		 strangeness.setRightName(null);
		 strangeness.setName("允许陌生人后台来电"); 
		 strangeness.setSwitchBtn(true, new SlideListener(){
			public void open() {
				
			}
			public void close() {
				
			}});
		 strangeness_list.add(strangeness);
		 listview_strangeness=getInitListView(strangeness_list, R.id.listview_strangeness_setting,false);
	}
	private void disturbEvent(){
		ArrayList<Item> disturb_list = new  ArrayList< Item>();
		 Item disturb=new Item();
		 disturb.setId("disturb");
		 disturb.setIcon(false);
		 disturb.setMidIcon(null);
		 disturb.setArrow_icon(false);
		 disturb.setRightName(null);
		 disturb.setName("免打扰时段[00:00-5:00]"); 
		 disturb.setSwitchBtn(true, new SlideListener(){
			public void open() {
				
			}
			public void close() {
				
			}});
		 disturb_list.add(disturb);
		 listview_disturb=getInitListView(disturb_list, R.id.listview_disturb_setting,false);
	}
	private void noticeEvent(){
		 ArrayList<Item> notice_list = new  ArrayList< Item>(); 
		 Item voice=new Item();
		 voice.setId("voice");
		 voice.setIcon(false);
		 voice.setMidIcon(null);
		 voice.setArrow_icon(false);
		 voice.setRightName(null);
		 voice.setName("声音"); 
		 voice.setSwitchBtn(true, new SlideListener(){
			public void open() {
				
			}
			public void close() {
				
			}});
		 notice_list.add(voice);
		 
		 Item shake=new Item();
		 shake.setId("shake");
		 shake.setIcon(false);
		 shake.setMidIcon(null);
		 shake.setArrow_icon(false);
		 shake.setRightName(null);
		 shake.setName("震动"); 
		 shake.setSwitchBtn(true, new SlideListener(){
			public void open() {
				
			}
			public void close() {
				
			}});
		 notice_list.add(shake);
		 listview_notice=getInitListView(notice_list, R.id.listview_notice_setting,false);
		
	}
	
	protected void keyEventOfListView(int position, int id) {

	}

}
